<?php

namespace App\Dao;

use Hyperf\Context\ApplicationContext;

class RankingDao
{

    private static $instance;

    public static function getInstance()
    {
        if (!self::$instance) {
            self::$instance = Applicationcontext::getcontainer()->get(self::class);
        }
        return self::$instance;
    }


    public function getPayCallRanding($uid)
    {
        $rank = 0;
        // if(date('G') == 0){
        //     $st = mktime(0,0,0,date('m'),date('d')-1,date('Y'));
        // }else{
        //     $st = mktime(0,0,0,date('m'),date('d'),date('Y'));
        // }
        // $result = $this->rankingData(6,$st,time(),true);
        // if(!empty($result)){
        //     $result = array_slice($result,0,3);
        //     foreach ($result as $k => $v){
        //         if($v['rid']==$uid){
        //             $rank=$k+1;break;
        //         }
        //     }
        // }
        return $rank;
    }

}